package com.example.javalib.array;

public class Trans {
    public static void main(String[] args) {
        int[][] a={
                {1,2,3},
                {4,5,6}
        };
        int[][] b =new int[3][2];
        for (int i = 0; i < a.length; i++) {
            int[] aa=a[i];
            for (int j = 0; j < aa.length; j++) {
                b[j][i]=a[i][j];
            }
        }

        for (int i = 0; i < b.length; i++) {
            int[] bb=b[i];
            for (int j = 0; j < bb.length; j++) {
                System.out.print(b[i][j]);
            }
            System.out.println();
        }


    }
}
